<template>
  <div class="container">
    <div>
      <!-- <Logo /> -->
      <!-- <h1 class="title">today</h1> -->
      <div>
        <el-table
          :default-sort="{ prop: 'tl', order: 'descending' }"
          :data="stujob.file_list"
          style="width: 100%"
        >
          <el-table-column type="index" :index="indexMethod"> </el-table-column>
          <el-table-column prop="tl" label="日期" width="360">
          </el-table-column>
          <el-table-column prop="fl" label="作业" width="360">
          </el-table-column>
          <el-table-column>
            <template #default="scope">
              <a :href="'/api/file/' + scope.row.fl">下载</a>
            </template>
          </el-table-column>
          <el-table-column>
            <template #default="scope">
              <!-- <el-button @click="download(scope.row)" type="text" size="small"
                >下载</el-button
              > -->
              <a :href="'/rewa/?ip=' + scope.row.fl.split('_')[0]">授权奖励</a>

              <!-- <el-button type="text" size="small">编辑</el-button> -->
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- <Default/> -->
    </div>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  data() {
    return {
      stujob: [],
      hills: {},
      show_tag:false
    };
  },

  mounted(){
    axios.get('/api/liststuf').then(
      res=>{
        this.stujob = res.data
        console.log(res.data,222)

      }
    ),
     axios.get('/api/showbutton').then(
      res=>{
        this.show_tag = res.data
      }
    )
  },
  
  methods:{
    indexMethod(index) {
        return index +1;
      }
  }
};
</script>

<style>
.container {
  height: 20vh;
}
</style>
